{if $user_profile->username eq $user->username}

    <p><font style="color:#46461F;size:17px;font-weight: bold;padding-top: 20px;">Discussioni</font></p>
    <table id="message_header" width="626" border="0">
        <tbody>
            <tr>
                <td id="bar" class="bar" height="17" colspan="2">Discussioni preferite</td>
            </tr>
        </tbody>
    </table>
    <table style="margin: 0 auto;" class="tab" width="590" border="1">
            <tbody>
                    <tr>
                        <td class="tb_head" style="padding-left: 15px;" colspan="2">Forum</td>
                        <td class="tb_head" align="center">Statistiche</td>
                        <td class="tb_head" align="center">Ultimo mess.</td>
                    </tr>
                    {foreach from=$favorite_topics item=topic name=topics}
                        <tr class="li">
                            <td class="ic" width="40">
                                <a href="forum.php5?mode=topic&id=1">
                                    <img border="0" alt="" src="static/images/layout/cartelletta.png">
                                </a>
                            </td>
                            <td class="c1" width="315">
                                <a href="forum.php?mode=topic&id={$topic->id_topic}">{$topic->name}</a>
                                <div class="dat" align="right">
                                    creata da 
                                    <a id="m" class="a_profilo" href="profilo.php5?id=11402">{$topic->creator}</a>
                                </div>
                            </td>
                            <td class="c2" width="100">
                                <div class="dat">
                                    {$topic->getNrPosts()} mess.
                                    <br>
                                    {$topic->views} visite
                                </div>
                            </td>
                            <td class="c3" width="120">
                                <div class="dat">
                                    24 febbraio 13
                                    <br>
                                    da 
                                    <a id="m" class="a_profilo" href="profilo.php5?username=">ponciste</a>
                                    <a href="forum.php5?mode=po&pid=2572313#p2572313">
                                        <img border="0" alt="" src="static/images/layout/fastreply.png">
                                    </a>
                                </div>
                            </td>
                        </tr>
                    {/foreach}

        </tbody>
    </table>
    <br /> <br />
    <table id="message_header" width="626" border="0">
        <tbody>
            <tr>
                <td id="bar" class="bar" height="17" colspan="2">Discussioni recenti</td>
            </tr>
        </tbody>
    </table>
    <table style="margin: 0 auto;" class="tab" width="590" border="1">
            <tbody>
                    <tr>
                        <td class="tb_head" style="padding-left: 15px;" colspan="2">Forum</td>
                        <td class="tb_head" align="center">Statistiche</td>
                        <td class="tb_head" align="center">Ultimo mess.</td>
                    </tr>
                    {foreach from=$recent_topics item=topic name=topics}
                        <tr class="li">
                            <td class="ic" width="40">
                                <a href="forum.php5?mode=topic&id=1">
                                    <img border="0" alt="" src="static/images/layout/cartelletta.png">
                                </a>
                            </td>
                            <td class="c1" width="315">
                                <a href="forum.php?mode=topic&id={$topic->id_topic}">{$topic->name}</a>
                                <div class="dat" align="right">
                                    creata da 
                                    <a id="m" class="a_profilo" href="profilo.php5?id=11402">{$topic->creator}</a>
                                </div>
                            </td>
                            <td class="c2" width="100">
                                <div class="dat">
                                    {$topic->getNrPosts()} mess.
                                    <br>
                                    {$topic->views} visite
                                </div>
                            </td>
                            <td class="c3" width="120">
                                <div class="dat">
                                    24 febbraio 13
                                    <br>
                                    da 
                                    <a id="m" class="a_profilo" href="profilo.php5?username=">ponciste</a>
                                    <a href="forum.php5?mode=po&pid=2572313#p2572313">
                                        <img border="0" alt="" src="static/images/layout/fastreply.png">
                                    </a>
                                </div>
                            </td>
                        </tr>
                    {/foreach}

        </tbody>
    </table>
    
{else}
    {include file="{$TEMPLATES_URL}profile_summary.tpl"}
{/if}